{% extends "base.html" %}

{% block stylesheets %}
{{ super() }}
<style>
  html, body {
      margin: 0;
      height: 100%;
      min-height: 100%;
  }
  body {
      display: flex;
      flex-direction: column;
  }
  nav, footer {
      flex: none;
  }
  main {
      flex: auto;
      margin-bottom: 0px;
  }
  iframe {
      height: 100%;
      width: 100%;
      overflow: hidden;
      border: none;
  }
  .inactive {
      height: 50%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      text-align: center;
  }
</style>
{% endblock %}

{% block content %}
{% if active %}
<iframe src="{{ iframe_src }}"></iframe>
{% else %}
<h1 class="inactive">没有开启的挑战关卡会话；请开启一个挑战关卡！<h1>
{% endif %}
{% endblock %}
